﻿
using System.Collections.Generic;

namespace Patterns4Net.Attributes.DesignPatterns
{
    using System;

    /// <summary>
    /// Use this attribute to annotate a type as an implementation of the State design pattern. 
    /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, Inherited = false, AllowMultiple = false)]
    public class StateAttribute : Attribute, IPattern, IPatternAttribute
    {
        public StateAttribute()
        {            
        }

        /// <summary>
        /// This constructor is required for AttributesPatternsProvider.
        /// </summary>
        /// <param name="values"></param>
        public StateAttribute(IDictionary<string, object> values)
        {            
        }

        public string Name
        {
            get { return "State"; }
        }

        public AbstractionLevel? AbstractionLevel
        {
            get { return Attributes.AbstractionLevel.Low; }
        }
    }
}
